﻿namespace Dyao.Book.Contract
{
    [Serializable]
    public class PaginationFilterDto
    {
        bool? _isQueryRecords;

        /// <summary>
        /// 当前页（从0开始）
        /// </summary>
        public int PageIndex { get; set; }

        /// <summary>
        /// 每页数量
        /// </summary>
        public int PageSize { get; set; }

        /// <summary>
        /// 排序列名
        /// </summary>
        public string SortName { get; set; }

        /// <summary>
        /// 排序方式(asc/desc)
        /// </summary>
        public string SortOrder { get; set; }

        /// <summary>
        /// 是否查询记录总数
        /// </summary>
        public bool IsQueryRecords
        {
            get => _isQueryRecords ?? true;
            set => _isQueryRecords = value;
        }
    }
}
